package com.jixiang.phone.controller;

import com.jixiang.phone.service.CodeService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import static com.jixiang.common.constants.CodeMqConstants.MQ_QUEUE_CODE;

@Controller
public class CodeController {

    @Autowired
    CodeService codeService;

    @RabbitListener(queues = MQ_QUEUE_CODE)
    public void listenCode(String code){
        codeService.sendCode(code);
    }



}
